import java.time.LocalDate;
import java.util.Calendar;
import java.util.Date;
import java.util.Locale;

public class NewLIne {

    static void drawTriangle(){

        for (int i = 0; i < 5; i++) {
            for (int j = 0; j < i+1; j++) {
                System.out.print("*");
            }
            System.out.println();
        }
    }

    static void drawTriangle2Line(){
        for (int i = 0; i < 5; i++) {
            for (int j = 5; j > i+1;  j--) {
                System.out.print(" ");
            }
            for (int j = 0; j <= i; j++) {
                System.out.print("*");
            }
            System.out.println("");
        }
    }



    public static void main(String[] args) {
        // static 修饰的main方法， 必须要使用static修饰的方法。 
        drawTriangle();
        drawTriangle2Line();

    }
}
